package com.javandad.app.shared.entity.project;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.javandad.app.shared.entity.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
public class Post implements Serializable {
	private static final long serialVersionUID = 1L;

	public Post(String projectname, String username, String subject,
			String text, Date date) {
		super();
		this.projectname = projectname;
		this.username = username;
		this.subject = subject;
		this.text = text;
		this.date = date;
	}

	@SuppressWarnings("unused")
	private Post() {
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getProjectname() {
		return projectname;
	}

	public void setProjectname(String projectname) {
		this.projectname = projectname;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public long getId() {
		return id;
	}

	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}


	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String projectname;
	@Persistent
	private String username;
	@Persistent
	private String subject;
	@Persistent
	private String text;
	@Persistent
	private Date date;

	private User user;
	
}
